package com.kumi.controller;


import com.kumi.controller.BaseController;
import com.kumi.viewmodel.ApiResult;
import com.kumi.viewmodel.Coupon;
import com.kumi.viewmodel.MapResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

/**
 * @author Basil on 2016-08-06.
 */
@RestController
@RequestMapping(value = "coupon")
public class CouponController extends BaseController {




    @RequestMapping(value = "list", method = RequestMethod.GET)
    public ApiResult list() {
        MapResult mapResult = new MapResult();
        ArrayList<Coupon> coupons=new ArrayList<Coupon>();
        coupons.add(new Coupon("5元优惠券",5));
        coupons.add(new Coupon("10元优惠券",10));
        coupons.add(new Coupon("20元优惠券",20));
        mapResult.put("couponList", coupons);
        return mapResult;

    }


}
